package Factory;

class PointFactory{
    public static Point NewPointByXY(double x,double y){
        Point point = new Point();
        //..
        return point;
    }
    public static Point NewPointByRA(double r, double a){
        Point point = new Point();
        //..
        return point;
    }
}

class Point{
    private int x;
    private int y;

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }
}

public class Demo1 {

}
